package com.hubery.designpattern.design.template.gant.impl;

import com.hubery.designpattern.design.decorator.dto.UserInfoDTO;
import com.hubery.designpattern.design.template.gant.AbstractGantPrizeTemplate;
import com.hubery.designpattern.enums.UserTypeEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author lixueyang
 * @since 2023/2/27 21:01
 */
@Slf4j
@Component
public class VipUserGantPrizeService extends AbstractGantPrizeTemplate {

    @Override
    protected boolean checkQualification(UserInfoDTO dto) {
        log.info("【VIP】用户 【{}】 校验是否有资格获取奖品", dto.getUsername());
        return true;
    }

    @Override
    protected UserTypeEnum getUserTypeEnum() {
        return UserTypeEnum.VIP;
    }
}
